package com.yang.SpringTest.annotation.autowiredLearn;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * <p>AutowiredDemoTest测试类</p>
 *
 * @author By: chengxuyuanshitang
 * Package com.yang.SpringTest.annotation.autowiredLearn
 * Ceate Time 2024-03-28 13:57
 */
@Slf4j
public class AutowiredDemoTest {
    public static void main (String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext (AutowiredDemoConfig.class);
        AutowiredDemoService autowiredDemoService = context.getBean (AutowiredDemoService.class);
        log.info ("autowiredDemoService is : [ {} ]", autowiredDemoService);
        AutowiredDemoController autowiredDemoController = context.getBean (AutowiredDemoController.class);
        log.info ("autowiredDemoController is : [ {} ]", autowiredDemoController);
        autowiredDemoController.test ();
    }
}

